using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._TerrainDataset
{
    /// <summary>
    /// <para>Create Terrain</para>
    /// <para>Creates a new terrain dataset.</para>
    /// <para>创建新的 terrain 数据集。</para>
    /// </summary>    
    [DisplayName("Create Terrain")]
    public class CreateTerrain : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateTerrain()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_feature_dataset">
        /// <para>Input Feature Dataset</para>
        /// <para>The feature dataset that will contain the terrain dataset.</para>
        /// <para>将包含 terrain 数据集的要素数据集。</para>
        /// </param>
        /// <param name="_out_terrain_name">
        /// <para>Output Terrain</para>
        /// <para>The name of the terrain dataset.</para>
        /// <para>terrain 数据集的名称。</para>
        /// </param>
        /// <param name="_average_point_spacing">
        /// <para>Average Point Spacing</para>
        /// <para>The average horizontal distance between the data points that will be used in modeling the terrain. Sensor based measurements, like photogrammetric, lidar, and sonar surveys, typically have a known spacing that should be used. The spacing should be expressed in the horizontal units of the feature dataset's coordinate system.</para>
        /// <para>将用于对地形进行建模的数据点之间的平均水平距离。基于传感器的测量，如摄影测量、激光雷达和声纳测量，通常具有应使用的已知间距。间距应以要素数据集坐标系的水平单位表示。</para>
        /// </param>
        public CreateTerrain(object _in_feature_dataset, object _out_terrain_name, double? _average_point_spacing)
        {
            this._in_feature_dataset = _in_feature_dataset;
            this._out_terrain_name = _out_terrain_name;
            this._average_point_spacing = _average_point_spacing;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Create Terrain";

        public override string CallName => "3d.CreateTerrain";

        public override List<string> AcceptEnvironments => ["autoCommit", "configKeyword", "workspace"];

        public override object[] ParameterInfo => [_in_feature_dataset, _out_terrain_name, _average_point_spacing, _max_overview_size, _config_keyword, _pyramid_type.GetGPValue(), _windowsize_method.GetGPValue(), _secondary_thinning_method.GetGPValue(), _secondary_thinning_threshold, _derived_out_terrain];

        /// <summary>
        /// <para>Input Feature Dataset</para>
        /// <para>The feature dataset that will contain the terrain dataset.</para>
        /// <para>将包含 terrain 数据集的要素数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Feature Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_feature_dataset { get; set; }


        /// <summary>
        /// <para>Output Terrain</para>
        /// <para>The name of the terrain dataset.</para>
        /// <para>terrain 数据集的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Terrain")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_terrain_name { get; set; }


        /// <summary>
        /// <para>Average Point Spacing</para>
        /// <para>The average horizontal distance between the data points that will be used in modeling the terrain. Sensor based measurements, like photogrammetric, lidar, and sonar surveys, typically have a known spacing that should be used. The spacing should be expressed in the horizontal units of the feature dataset's coordinate system.</para>
        /// <para>将用于对地形进行建模的数据点之间的平均水平距离。基于传感器的测量，如摄影测量、激光雷达和声纳测量，通常具有应使用的已知间距。间距应以要素数据集坐标系的水平单位表示。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Average Point Spacing")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _average_point_spacing { get; set; }


        /// <summary>
        /// <para>Maximum Overview Size</para>
        /// <para>The terrain overview is akin to the image thumbnail concept. It is the coarsest representation of the terrain dataset, and the maximum size represents the upper limit of the number of measurement points that can be sampled to create the overview.</para>
        /// <para>地形概览类似于图像缩略图概念。它是地形数据集的最粗略表示，最大大小表示可以采样以创建概览的测量点数的上限。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Overview Size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _max_overview_size { get; set; } = 50000;


        /// <summary>
        /// <para>Config Keyword</para>
        /// <para>The configuration keyword for optimizing the terrain's storage in an enterprise database.</para>
        /// <para>用于优化企业级数据库中地形存储的配置关键字。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Config Keyword")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _config_keyword { get; set; } = null;


        /// <summary>
        /// <para>Pyramid Type</para>
        /// <para><xdoc>
        ///   <para>The point thinning method used to construct the terrain pyramids.</para>
        ///   <bulletList>
        ///     <bullet_item>Window Size—Thinning is performed by selecting data points in the area defined by a given window size for each pyramid level using the criterion specified in the Window Size Method parameter.</bullet_item><para/>
        ///     <bullet_item>Z Tolerance—Thinning is performed by specifying the vertical accuracy of each pyramid level relative to the full resolution of the data points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于构建地形金字塔的点细化方法。</para>
        ///   <bulletList>
        ///     <bullet_item>窗口大小 （Window Size） - 通过使用窗口大小方法参数中指定的条件，在由每个金字塔级别的给定窗口大小定义的区域中选择数据点来执行变薄。</bullet_item><para/>
        ///     <bullet_item>Z 容差 （Z Tolerance） - 通过指定每个金字塔级别相对于数据点全分辨率的垂直精度来执行细化。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pyramid Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _pyramid_type_value _pyramid_type { get; set; } = _pyramid_type_value._WINDOWSIZE;

        public enum _pyramid_type_value
        {
            /// <summary>
            /// <para>Window Size</para>
            /// <para>Window Size—Thinning is performed by selecting data points in the area defined by a given window size for each pyramid level using the criterion specified in the Window Size Method parameter.</para>
            /// <para>窗口大小 （Window Size） - 通过使用窗口大小方法参数中指定的条件，在由每个金字塔级别的给定窗口大小定义的区域中选择数据点来执行变薄。</para>
            /// </summary>
            [Description("Window Size")]
            [GPEnumValue("WINDOWSIZE")]
            _WINDOWSIZE,

            /// <summary>
            /// <para>Z Tolerance</para>
            /// <para>Z Tolerance—Thinning is performed by specifying the vertical accuracy of each pyramid level relative to the full resolution of the data points.</para>
            /// <para>Z 容差 （Z Tolerance） - 通过指定每个金字塔级别相对于数据点全分辨率的垂直精度来执行细化。</para>
            /// </summary>
            [Description("Z Tolerance")]
            [GPEnumValue("ZTOLERANCE")]
            _ZTOLERANCE,

        }

        /// <summary>
        /// <para>Window Size Method</para>
        /// <para><xdoc>
        ///   <para>The criterion used for selecting points in the area defined by the window size. This parameter is only applicable when Window Size is specified in the Pyramid Type parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Minimum Z—The point with the smallest elevation value.</bullet_item><para/>
        ///     <bullet_item>Maximum Z—The point with the largest elevation value.</bullet_item><para/>
        ///     <bullet_item>Closest To Mean Z—The point with the elevation value closest to the average of all values.</bullet_item><para/>
        ///     <bullet_item>Minimum and Maximum Z—The points with the smallest and largest elevation values.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于在由窗口大小定义的区域中选择点的条件。仅当在“金字塔类型”参数中指定了“窗口大小”时，该参数才适用。</para>
        ///   <bulletList>
        ///     <bullet_item>最小 Z - 高程值最小的点。</bullet_item><para/>
        ///     <bullet_item>最大 Z - 具有最大高程值的点。</bullet_item><para/>
        ///     <bullet_item>最接近均值 Z - 高程值最接近所有值的平均值的点。</bullet_item><para/>
        ///     <bullet_item>最小和最大 Z - 具有最小和最大高程值的点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Window Size Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _windowsize_method_value _windowsize_method { get; set; } = _windowsize_method_value._ZMIN;

        public enum _windowsize_method_value
        {
            /// <summary>
            /// <para>Minimum Z</para>
            /// <para>Minimum Z—The point with the smallest elevation value.</para>
            /// <para>最小 Z - 高程值最小的点。</para>
            /// </summary>
            [Description("Minimum Z")]
            [GPEnumValue("ZMIN")]
            _ZMIN,

            /// <summary>
            /// <para>Maximum Z</para>
            /// <para>Maximum Z—The point with the largest elevation value.</para>
            /// <para>最大 Z - 具有最大高程值的点。</para>
            /// </summary>
            [Description("Maximum Z")]
            [GPEnumValue("ZMAX")]
            _ZMAX,

            /// <summary>
            /// <para>Closest To Mean Z</para>
            /// <para>Closest To Mean Z—The point with the elevation value closest to the average of all values.</para>
            /// <para>最接近均值 Z - 高程值最接近所有值的平均值的点。</para>
            /// </summary>
            [Description("Closest To Mean Z")]
            [GPEnumValue("ZMEAN")]
            _ZMEAN,

            /// <summary>
            /// <para>Minimum and Maximum Z</para>
            /// <para>Minimum and Maximum Z—The points with the smallest and largest elevation values.</para>
            /// <para>最小和最大 Z - 具有最小和最大高程值的点。</para>
            /// </summary>
            [Description("Minimum and Maximum Z")]
            [GPEnumValue("ZMINMAX")]
            _ZMINMAX,

        }

        /// <summary>
        /// <para>Secondary Thinning Method</para>
        /// <para><xdoc>
        ///   <para>Specifies additional thinning options to reduce the number of points used over flat areas when Window Size pyramids are being used. An area is considered flat if the heights of points in an area are within the value supplied for the Secondary Thinning Threshold parameter. Its effect is more evident at higher-resolution pyramid levels, since smaller areas are more likely to be flat than larger areas.</para>
        ///   <bulletList>
        ///     <bullet_item>None—No secondary thinning will be performed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Mild—Works best to preserve linear discontinuities (for example, building sides and forest boundaries). It is recommended for lidar that includes both ground and nonground points. It will thin the fewest points.</bullet_item><para/>
        ///     <bullet_item>Moderate—Provides a good trade-off between performance and accuracy. It does not preserve as much detail as mild thinning but comes nearly as close while eliminating more points overall.</bullet_item><para/>
        ///     <bullet_item>Strong—Removes the most points but is less likely to preserve sharply delineated features. Its use should be limited to surfaces where slope tends to change gradually. For example, strong thinning would be efficient for bare-earth lidar and bathymetry.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定其他细化选项，以减少使用“窗口大小”金字塔时在平整区域上使用的点数。如果区域中的点的高度在为二次减薄阈值参数提供的值范围内，则将区域视为平坦。它的影响在更高分辨率的金字塔级别更为明显，因为较小的区域比较大的区域更有可能是平坦的。</para>
        ///   <bulletList>
        ///     <bullet_item>无—不执行二次疏伐。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>温和 - 最适合保留线性不连续性（例如，建筑物侧和森林边界）。建议用于同时包含接地点和非接地点的激光雷达。它会稀释最少的点。</bullet_item><para/>
        ///     <bullet_item>中等 - 在性能和准确性之间提供良好的权衡。它没有像轻度变薄那样保留那么多的细节，但几乎同样接近，同时总体上消除了更多的点。</bullet_item><para/>
        ///     <bullet_item>强 （Strong） - 移除最多点，但不太可能保留清晰描绘的要素。它的使用应仅限于坡度趋于逐渐变化的表面。例如，强力疏伐对于裸地激光雷达和测深测量是有效的。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Secondary Thinning Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _secondary_thinning_method_value _secondary_thinning_method { get; set; } = _secondary_thinning_method_value._NONE;

        public enum _secondary_thinning_method_value
        {
            /// <summary>
            /// <para>None</para>
            /// <para>None—No secondary thinning will be performed. This is the default.</para>
            /// <para>无—不执行二次疏伐。这是默认设置。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

            /// <summary>
            /// <para>Mild</para>
            /// <para>Mild—Works best to preserve linear discontinuities (for example, building sides and forest boundaries). It is recommended for lidar that includes both ground and nonground points. It will thin the fewest points.</para>
            /// <para>温和 - 最适合保留线性不连续性（例如，建筑物侧和森林边界）。建议用于同时包含接地点和非接地点的激光雷达。它会稀释最少的点。</para>
            /// </summary>
            [Description("Mild")]
            [GPEnumValue("MILD")]
            _MILD,

            /// <summary>
            /// <para>Moderate</para>
            /// <para>Moderate—Provides a good trade-off between performance and accuracy. It does not preserve as much detail as mild thinning but comes nearly as close while eliminating more points overall.</para>
            /// <para>中等 - 在性能和准确性之间提供良好的权衡。它没有像轻度变薄那样保留那么多的细节，但几乎同样接近，同时总体上消除了更多的点。</para>
            /// </summary>
            [Description("Moderate")]
            [GPEnumValue("MODERATE")]
            _MODERATE,

            /// <summary>
            /// <para>Strong</para>
            /// <para>Strong—Removes the most points but is less likely to preserve sharply delineated features. Its use should be limited to surfaces where slope tends to change gradually. For example, strong thinning would be efficient for bare-earth lidar and bathymetry.</para>
            /// <para>强 （Strong） - 移除最多点，但不太可能保留清晰描绘的要素。它的使用应仅限于坡度趋于逐渐变化的表面。例如，强力疏伐对于裸地激光雷达和测深测量是有效的。</para>
            /// </summary>
            [Description("Strong")]
            [GPEnumValue("STRONG")]
            _STRONG,

        }

        /// <summary>
        /// <para>Secondary Thinning Threshold</para>
        /// <para>The vertical threshold used to activate secondary thinning with the Window Size filter. The value should be set equal to or larger than the vertical accuracy of the data.</para>
        /// <para>用于使用“窗口大小”过滤器激活二次稀疏的垂直阈值。该值应设置为等于或大于数据的垂直精度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Secondary Thinning Threshold")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _secondary_thinning_threshold { get; set; } = 1;


        /// <summary>
        /// <para>Output Terrain</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Terrain")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _derived_out_terrain { get; set; }


        public CreateTerrain SetEnv(int? autoCommit = null, object configKeyword = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, configKeyword: configKeyword, workspace: workspace);
            return this;
        }

    }

}